package com.liufei1988.java8.object;

public class ObjectDemo {

    public Class<?> getClassTest(){
        return this.getClass();

    }
    public int hashCode(){
        return super.hashCode();
    }

    public static void main(String[] args) {
        ObjectDemo objectDemo=new ObjectDemo();
        ObjectDemo objectDemo1=new ObjectDemo();
        ObjectDemo objectDemo2=new ObjectDemo();
        ObjectDemo objectDemo3=new ObjectDemo();
        ObjectDemo objectDemo4=new ObjectDemo();
        objectDemo.getClass();
        objectDemo.getClassTest();
        System.out.println(objectDemo.getClass());

        System.out.println(objectDemo.hashCode());
        System.out.println(objectDemo1.hashCode());
        System.out.println(objectDemo2.hashCode());
        System.out.println(objectDemo3.hashCode());
        System.out.println(objectDemo4.hashCode());
        System.out.println(objectDemo.equals(objectDemo1));

        String s1=new String("111");
        String s2=new String("111");
        System.out.println(s1.equals(s2));
    }
}
